@import (reference) '../style/themes/default.less';

.amFormat(@name, @val, @default) {
  @{name}: @default;
  @{name}: ~'var(--@{val}, @{default})';
}

.am-radio {
  position: relative;
  .amFormat(height, am-radio-size, @icon-size-xs);
  .amFormat(width, am-radio-size, @icon-size-xs);
  display: inline-block;
  line-height: @line-height-base;
  &-value {
    position: absolute;
    z-index: 1;
    opacity: 0;
  }
}

.am-radio .am-radio-synthetic {
  position: absolute;
  opacity: 0;
  z-index: 2;
  line-height: @line-height-base;
  pointer-events: none;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  .amFormat(font-size, am-radio-size, @icon-size-xs);
  text-align: center;
  .amFormat(color, am-radio-color, @color-text-primary);
}

.am-radio-value.a-radio-checked + .am-radio-synthetic {
  opacity: 1;
}

.am-radio-value.a-radio-checked.a-radio-disabled + .am-radio-synthetic {
  opacity: @opacity-disabled;
}
